package com.softcits.hw.ioc;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class Person {

    private Aue aue;
    
    
    public Person() {
        
    }
   @Autowired
    public Person(@Qualifier("stone") Aue aue, @Qualifier("steal") Aue steal) {
        this.aue = aue;
        System.out.println("yuanshiren is using stone axe to chop");
    }
   
   public Person(Aue aue) {
       this.aue = aue;
       System.out.println("yuanshiren is using stone axe to chop");
   }
   
   public void init() {
       System.out.println("init method is running....");
   }
   
   public void destroyed() {
       System.out.println("Destroyed method is running...");
   }
   
   @PostConstruct
   public void before() {
       System.out.println("@PostConstruct");
   }
   
   @PreDestroy
   public void after() {
       System.out.println("@PreDestroy");
   }
}
